]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
networkAgent: ensure auto-register is set when the component is enabled
authorAleksander Morgado <aleksander@lanedo.com>
Thu, 15 Nov 2012 21:47:32 +0000 (22:47 +0100)
committerAleksander Morgado <aleksander@lanedo.com>
Tue, 20 Nov 2012 13:00:03 +0000 (14:00 +0100)
Setting auto-register to true launches the initial registration, and will
afterwards re-launch the agent registration if NetworkManager gets restarted.

When the component is disabled we'll first disable auto-registration, and only
then request to unregister.

https://bugzilla.gnome.org/show_bug.cgi?id=688379

js/ui/components/networkAgent.js

index 986c4bd63f21aacbfce1de2f34351ff3ade2732f..d1c984643b6fbbef820513301ed56dd0070002fe 100644 (file)
@@ -598,7 +598,7 @@ const NetworkAgent = new Lang.Class({
     },
 
     enable: function() {
-        this._native.register();
+        this._native.auto_register = true;
     },
 
     disable: function() {
@@ -612,6 +612,7 @@ const NetworkAgent = new Lang.Class({
             this._vpnRequests[requestId].cancel(true);
         this._vpnRequests = { };
 
+        this._native.auto_register = false;
         this._native.unregister();
     },